package com.cn.event;

import com.cn.service.RunLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Created by chenyuncong on 2018/8/6.
 */
@Component
public class RunLogEventListener {

    @Autowired
    private RunLogService runLogService;

    @Autowired
    private MongoTemplate mongoTemplate;

    @Async
    @EventListener
    public void handleDemoEvent(RunLogEvent event) {
        //批量数据放这里
    }
}
